package com.wxz.gblw.cjg.utils.generator;

import com.wxz.gblw.cjg.utils.generator.config.FreemarkerUtils;
import com.wxz.gblw.cjg.utils.generator.config.GeneratorConfig;

import java.util.Arrays;

/**
 * 代码生成器工具
 * @author xiangzhong.wang
 * @date 2019-12-31 14:09
 */
public class CodeGeneratorUtil {
    public static void main(String[] args) {
        GeneratorConfig config = new GeneratorConfig();
        config.setUrl("jdbc:mysql://127.0.0.1:3306/gblw_cjg");
        config.setDriver("com.mysql.jdbc.Driver");
        config.setUser("root");
        config.setPassword("123456");
        config.setPath("D:\\java\\workspaces\\WorkSpaces_gblw_wxz\\idea_ws_wxz\\gblw-cjg\\src\\main\\java\\com\\wxz\\gblw\\cjg");
        config.setClassPath("com.wxz.gblw.cjg");
        config.setIgnorePrefix(Arrays.asList("cjg_"));//多个以逗号隔开  "",""
        config.setIgnoreColPrefix(Arrays.asList("fk_"));

        FreemarkerUtils freemarkerUtils = new FreemarkerUtils(config);

        freemarkerUtils.execute();
    }
}
